<template>
	<view class="home">
		<view class="tabs_monitor">
			<view class="tabs_i" v-for="(i,index) in monitorArr" :key="index" @click="monitorFn(i.text)">
				<image class="img" :src="i.img" mode=""></image>
				<view class="text">
					<view class="">
						{{i.text}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				monitorArr: [{
					img: require('@/static/home/celac.png'),
					text: '点流速-计算流量'
				},{
					img: require('@/static/home/celac.png'),
					text: '信号数-计算流量'
				}, {
					img: require('@/static/home/liusuyi.png'),
					text: '添加流速仪'
				}, {
					img: require('@/static/home/cezhan.png'),
					text: '添加渠道断面'
				} ],
			}
		},
		onLoad(option) {

		},
		methods: {
			monitorFn(i) {
				console.log('i', i);
				if (i == '点流速-计算流量') {
					uni.navigateTo({
						url: '/pagesA/aproductA/automaticCalCezhan'
					});
				}
				if (i == '信号数-计算流量') {
					uni.navigateTo({
						url: '/pages/tool/signalFlow'
					});
				}
				if (i == '添加流速仪') {
					uni.navigateTo({
						url: '/pagesA/aproductA/saveLiusuyiList'
					});
				}
				if (i == '添加渠道断面') {
					uni.navigateTo({
						url: '/pages/cezhanguanli/increase'
					});
				}
			}
		}
	}
</script>
<style scoped lang="scss">
	// 水情
	.tabs_monitor {
		padding: 30rpx;

		.tabs_i {
			margin-bottom: 30rpx;
			padding: 30rpx;
			border-radius: 20rpx;
			text-align: center;
			background-color: #f0f4f7;
			box-shadow: 0 0 10rpx 5rpx rgba(0, 0, 0, 0.1);
			border: 3rpx solid #fff;
			display: flex;
			align-items: center;
			justify-content: space-around;

			.img {
				width: 120rpx;
				height: 120rpx;
			}

			.text {
				width: 450rpx;
				color: #000000;
				font-size: 60rpx;
			}
		}
	}
</style>
<style>
	page {
		background-color: #f0f4f7;
	}
</style>